<html><!-- Created using the cpp_pretty_printer from the dlib C++ library.  See http://dlib.net for updates. --><head><title>dlib C++ Library - windows_magic.h</title></head><body bgcolor='white'><pre>
<font color='#009900'>// Copyright (C) 2006  Davis E. King (davis@dlib.net)
</font><font color='#009900'>// License: Boost Software License   See LICENSE.txt for the full license.
</font><font color='#0000FF'>#ifndef</font> DLIB_WINDOWS_MAGIc_ 
<font color='#0000FF'>#define</font> DLIB_WINDOWS_MAGIc_ 

<font color='#0000FF'>#include</font> "<a style='text-decoration:none' href='platform.h.html'>platform.h</a>"

<font color='#0000FF'>#ifdef</font> WIN32

<font color='#009900'>// This file contains all the magical #defines you have to setup  before you
</font><font color='#009900'>// include the windows header files.  
</font>
<font color='#0000FF'>#ifndef</font> NOMINMAX
<font color='#0000FF'>#define</font> NOMINMAX <font color='#009900'>// prevent windows from messing with std::min and std::max
</font><font color='#0000FF'>#endif</font>

<font color='#009900'>// Prevent windows from #defining IN or OUT
</font><font color='#0000FF'>#ifndef</font> _NO_W32_PSEUDO_MODIFIERS
<font color='#0000FF'>#define</font> _NO_W32_PSEUDO_MODIFIERS
<font color='#0000FF'>#endif</font>

<font color='#009900'>// now just for good measure undefine min and max if they are defined
</font><font color='#0000FF'>#ifdef</font> min
<font color='#0000FF'>#undef</font> min
<font color='#0000FF'>#endif</font>

<font color='#0000FF'>#ifdef</font> max 
<font color='#0000FF'>#undef</font> max 
<font color='#0000FF'>#endif</font>

<font color='#0000FF'>#ifdef</font> NO_MAKEFILE
<font color='#009900'>// only define this if all the cpp files are going to be sucked into the headers 
</font><font color='#009900'>// because otherwise we don't need it since everything is isolated in the sockets
</font><font color='#009900'>// cpp file and this declaration for _WINSOCKAPI_ appears there also.
</font><font color='#0000FF'>#ifndef</font> _WINSOCKAPI_
<font color='#0000FF'>#define</font> _WINSOCKAPI_   <font color='#009900'>/* Prevent inclusion of winsock.h in windows.h */</font>
<font color='#0000FF'>#endif</font>
<font color='#0000FF'>#endif</font>

<font color='#009900'>// This is something stupid you have to do to make visual studio include the right
</font><font color='#009900'>// stuff.  I don't really know what the deal is with this.
</font><font color='#0000FF'>#if</font> _WIN32_WINNT <font color='#5555FF'>&lt;</font> <font color='#979000'>0x0500</font>
<font color='#0000FF'>#undef</font> _WIN32_WINNT
<font color='#0000FF'>#define</font> _WIN32_WINNT <font color='#979000'>0x0500</font>
<font color='#0000FF'>#endif</font>

<font color='#0000FF'>#endif</font> <font color='#009900'>// WIN32
</font>
<font color='#0000FF'>#endif</font> <font color='#009900'>// DLIB_WINDOWS_MAGIc_
</font>

</pre></body></html>